from app.constant import RESPONSE_MESSAGE

def Response(code, data :any = None, message :str = None):
    if message == None:
        return {
            "code": code,
            "data" : data,
            "msg": RESPONSE_MESSAGE[code]
        }
    return {
        "code": code,
        "data" : data,
        "msg": message
    }